#include <stdio.h>
#include <assert.h>

#define LLT long long int

#ifndef NDEBUG
    #define DOUT( toprint ) printf( "# " toprint )
    #define DPUT( toput , x ) printf( "# " toput , x )
    #define DPUTCLOSURE DOUT("==============================================================================\n"); \
                        DPUT( "FILE: %s\n", __FILE__ ); \
                        DPUT( "TIME OF COMPILATION: %s\n", __TIME__ )
    #define DLN

#else
    #define DOUT
    #define DPUT
    #define DPUTCLOSURE
    #define DLN if(0)
#endif

int main() {
    DOUT("=======================2007, 1 semester assignment, 1-C=======================\n");
    DOUT("==============================================================================\n");
    DOUT("Please enter a natural number which is tested as described in the task:\n");
    DOUT("> ");

    LLT n = 0;
    register int chk = scanf("%lld", &n);
    DLN assert(( "You have entered a single number" , chk == 1 ));

    bool ok = 1;
    while(n) {
        if((n%4) == 2) {
            ok=0;
            break;
        } else
            n = (n+1)/4;
    }


    if(ok) printf("YES\n");
    else printf("NO\n");


    DPUTCLOSURE;

    return 0;
}
